#!/usr/bin/perl -w
#
# Compare 2 counter copies, listing those files that are in 1 but not 2
#
open(OLD, "cd counterkopi; find . |");
while ($file = <OLD>) {
    chop $file;
    next if -l "counterkopi/$file";
    next if $file =~ /~$/;
    next if $file =~ /\/.#/;
    next if $file =~ /\/CVS/;
    next if $file =~ /\/bycountry/;
    next if $file =~ /\/db/;
    next if $file =~ /\/logs/;
    next if $file =~ /\/reports/;
    next if $file =~ /\/temp/;
    next if $file =~ /\/tempplots/;
    next if $file =~ /\/counter.li.org/;
    if (-d "counterkopi/$file") {
	if (! -d "counter/$file") {
	    print "mkdir counter/$file\n";
	}
	next;
    }
    if (! -f "counter/$file") {
	print "cp -p counterkopi/$file counter/$file\n";
    }
}


      
